﻿using System;
using System.Collections.Generic;

namespace Sinacor.UI.Application.Menu.Model
{
    public class MenuItem
    {
        private Int32 _id;
        private string _name;
        private string _classe;
        private string _assembly;
        private string _role;
        private List<MenuItem> _children;

        public Int32 Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public string Text
        {
            get
            {
                string text = string.Empty;

                if (System.Windows.Application.Current.TryFindResource(_name) != null)
                {
                    text = System.Windows.Application.Current.FindResource(_name).ToString();
                }

                return text;
            }
        }

        public string Classe
        {
            get { return _classe; }
            set { _classe = value; }
        }

        public string Assembly
        {
            get { return _assembly; }
            set { _assembly = value; }
        }

        public string Role
        {
            get { return _role; }
            set { _role = value; }
        }

        public List<MenuItem> Children
        {
            get { return _children; }
            set { _children = value; }
        }
    }
}